package com.example.nacosconsumer.controller;

import com.example.nacosconsumer.feign.Demo1Feign;
import com.example.nacosconsumer.feign.DemoFeign;
import com.example.nacosconsumer.feign.ProviderFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalTime;

/**
 * @program: springcloud-alibaba-project
 * @author: daPangDong
 * @create: 2022-04-08 21:38
 */
@RestController
public class ConsummerController {

    @Autowired
    private ProviderFeign providerFeign;

    @Autowired
    private Demo1Feign demo1Feign;

    @Autowired
    private DemoFeign demoFeign;


    @GetMapping("/test")
    public String test() {
        System.out.println(providerFeign.invoke());
        return providerFeign.invoke();
    }

    @GetMapping("/test2")
    public String test2() {
        System.out.println(demo1Feign.invoke());
        return demo1Feign.invoke();
    }

    @GetMapping("/test3")
    public String test3() {
        System.out.println(demoFeign.invoke());
        return demoFeign.invoke();
    }
}
